<template>
  <div class="order-list">
    <van-tabs v-model="active" swipeable animated>
      <van-tab v-for="item in options" :key="item.id" :title="item.title">
        内容 {{ item.title }}
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import Vue from "vue";
import { Tab, Tabs } from "vant";
import routes from "@/router/routes";

Vue.use(Tab);
Vue.use(Tabs);

export default {
  name: "OrderList",
  data() {
    return {
      active: 2,
      options: []
    };
  },
  created() {
    let _index = null;
    routes.forEach((item, index) => {
      if (item.name === "OrderList") _index = index;
    });
    this.options = routes[_index].meta.optionsList;
  }
};
</script>

<style lang="scss" scoped></style>
